﻿using System.Windows;
using Prism.Events;
using Prism.Ioc;
using Prism.Unity;
using YF_Music.Core.Events;

namespace YF_Music.Views
{
  /// <summary>
  /// Interaction logic for MainWindow.xaml
  /// </summary>
  public partial class MainWindow : Window
  {
    IEventAggregator eventAggregator;
    public MainWindow()
    {
      InitializeComponent();
      eventAggregator = ((PrismApplication)Application.Current).Container.Resolve<IEventAggregator>();
      Closing += (s, e) =>
            {
              eventAggregator.GetEvent<AppCloseEvent>().Publish();
            };
    }
  }
}
